The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
Well, I will be honest with you, a lot is wrong with your code.
You messed up commands and you didn't used the catchevent properly.
So I have re-arranged and corrected your code.
I've only tested it to see if it runs without errors now (which is the case), but haven't tested if it does what you want it to do.

- Download the file
- Rename it to sector_times3.lpr
- Put it in the "includes" folder
Yisc[NL]
S3 licensed
Quote from VolksTurbo :But what I want is to send a message in connection with / msg: s

Have you ever looked at the actual code and read through changes.txt (found in the 'doc' folder of Lapper) to see all that is possible with Lapper?
I don't mind writing scripts that are (a bit) complicated, but something as basic as putting a message on the screen when someone enters, is very basic.
Not to mention the fact that these kind of wishes are useful to learn how Lapper works.

Here's version 1.01 of the Admin notify script, which sends a global message when an admin enters the server.
If you don't want the HUD to be shown, put a # at the start of this line:

openGlobalButton( "admins_present",50,1,100,5,1,-1,36,"^7Admin(s): ". $admin_status . " ^7| Last entered: " . $admin_name . " ^7| At: " . $admin_time_online );

- Download the file and save it somewhere on your computer
- Rename the file from "admin_notify.txt" to "admin_notify.lpr"
- Place the file in the 'includes' folder, found in 'bin\default\'
- Open file "addonsused.lpr" which is also in the 'includes' folder
- Add a line under 'General includes' saying: include ("./admin_notify.lpr");
- Save file "addonsused.lpr"
- Start Lapper

To add or remove admins, open file "admin.txt" which is found in the 'default' folder.
You have to state the LFS username of each admin, one per line.
Yisc[NL]
S3 licensed
Quote from VolksTurbo :Would you do that when you enter a system administrator send a message that says "NickName connected server administrator" thanks

I already made that script, see this posting: https://www.lfs.net/forum/post/1896128#post1896128
Yisc[NL]
S3 licensed
Here's another update on the project.
I didn't got as much done this weekend as I hoped for, but still made good progress.
While testing the software, I figured it would be nice to be able to define streets as a one way or a two way direction.
So I've added that into the module to define streets with.

Once that was done, I thought about a penalty for driving into a street from the wrong direction.
So that had to be added too and then things started to go from bad to worse.
This afternoon it nearly was too much to handle and I was this close to delete all the files from my computer and give up on the project (yeah yeah, I am hot headed from time to time).
After a break I saw the light and as often, a big re-write of the code, put back all things in place again.

While doing that I've also added a counter that registers how many violations a person has open at that time.
So while every violation makes the offender vulnerable to be chased and booked within 120 seconds (and each violation within that period, will add another 120 seconds to that counter), it would also make them a bigger fish to catch for the police.
The idea is that each violation will enable 1 cop to chase and try to book you.
So with 2 open violations and a maximum of 240 seconds on the clock, 2 cops and try to chase and book you.
With 3 open violations, 3 cops can chase you, and so on and so on.

The part about how many cops can chase you and how the booking should go (of course only 1 cop can be awarded 'the kill'), has still to be written and is next up my list.





Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
After Lapper has started, drive your car to the point you want the node to be and then type: !setnode
Then the node will stay registered for as long as Lapper keeps running.
After a restart of Lapper, you have to set the node again.
Yisc[NL]
S3 licensed
Quote from VolksTurbo :Thank you very much Yisc [NL] a question where I add the node in the system?

Just anywhere you want.
Drive to point you want to add the node and then type: !setnode
That will register the current node and set a counter to 0.
As soon as someone enters that node, the counter will be raised by 1 and as soon as someone leaves the node, it will be lowered by 1.
If the counter is at 3 and a 4th person enters the node, that last person will be spectated.

Be aware though, nodes are only working on regular tracks, since all X and Y tracks (aka open configs) will always return 0 when current node is used.
Yisc[NL]
S3 licensed
Quote from VolksTurbo :There any way to make a system that when there are four vehicles in the last node to be parked there sent it to viewers?

That leaves only three cars parked in a node

Here's the requested script.

-Download and save the file
-Rename it to: parc_ferme.lpr
-Place the file in the "includes" folder
-Open addonsused.lpr
-Add the following line in the "General includes" sections: include( "./parc_ferme.lpr");
Yisc[NL]
S3 licensed
Quote from VolksTurbo :Is there any way that lapper detects when three vehicles on a node, and if a fourth vehicle is parked send it to viewers?

Yeah it's possible to define a node and then count how many cars are on that node.
If the counter reaches 4, the last one who entered the node, is spectated.
Yisc[NL]
S3 licensed
Quote from VolksTurbo :You could make a system to reach the 100 display a message? please

That's in Lapper by default.
Look for this section:

##########################
#Options for acceleration#
##########################

$AccelerationStartSpeed = 1; # At which speed to start measuring time. In km/h
$AccelerationEndSpeed = 100; # At which speed to stop measuring time. In km/h

$AccelerationStartSpeedMph = 1; # At which speed to start measuring time. In Mph
$AccelerationEndSpeedMph = 60; # At which speed to stop measuring time. In Mph

$AccelerationPrivateMaxTime = 10; # Maximum acceleration time in seconds to show message

#Message to show to players.
#Possible variables to use:
#{AccelerationStartSpeed} - Starting speed
#{AccelerationEndSpeed} - Ending speed
#{AccelerationTime} - Acceleration time achieved from start to end speed
#{UnitSpeed} Unit of the Speed of the player connected

Event OnAcceleration( $userName ) # Player event
privMsg( langEngine( "%{main_accel}%" ,GetCurrentPlayerVar("AccelerationTime"),GetCurrentPlayerVar("AccelerationEndSpeed"),GetCurrentPlayerVar("UnitSpeed") ) );
EndEvent

Yisc[NL]
S3 licensed
Quote from misiek08 :Maybe you can do some refreshed Drag system? I'm working in spare time on PHP version, but it will take me few more weeks, because I don't have much time for this.

Drag system where you specify start position like in original InSim made long time ago here.

What should be refreshed in relation to the currect script that is included in the Lapper distribution?
If I would know what should be done, I might want to look into it.
Yisc[NL]
S3 licensed
Can you post a couple of screenshots of what is happening?
To close a button in Lapper, the ID of that button is used.
Maybe the close routine isn't refering to all the correct ID's.
Make a copy of the LPR file, then rename that copy to .txt and upload it to the forum as well.
Yisc[NL]
S3 licensed
Quote from VolksTurbo :Another question is: because lapper leaves open only three buttons? : s

If active semaphore drag me close several buttons: s

This should have gone into another section, since it's about a configuration problem and not about requesting a script.
So please put this question in the "Config help" section and explain more what the problem is, add the script you are using and maybe some screenshots too.
All that will help to make it easier to understand what is happening and how it could be solved.
Yisc[NL]
S3 licensed
Quote from VolksTurbo :Could I make a system that upon entering the server display a message if the user has S1 or S2 license Demo please thanks.

Lapper can't detect that with some sort of variable, but I have an idea how it could still be done.
Will look into it later this week.
Yisc[NL]
S3 licensed
I spotted a small spelling issue.
It says "Store coordinations" instead of "Store coordinates".
Other then that, keep up the good work and you know where to find me if help is needed in any way.
Yisc[NL]
S3 licensed
I can't see any obvious problem and do see you worked your way around the wrong syntax being displayed in 'changes.txt' when it comes to RegisterzoneAction Thumbs up
Since your Lapper crashes as soon as you entered a supposedly deleted zone, it looks like Lapper still tries to fire the "Enter zone event" but only finds a corrupt line of code and then crashes.
All the latest Lapper crashes I recently ran into, were caused by missing () or ;
So you might want to inspect these creepy little fellows.
Stopping these crashes (even when the code is wrong, Lapper should never crash on that) is high on my list when ever my friend has some spare time and is willing to work on Lapper some more for me/us.
Yisc[NL]
S3 licensed
Litle update on this project.
I've finished most of the chase and book code this evening.

There are two ways to start a chase:

1) you type: !chase [lfs username]
2) you type: !chasehud , followed by clicking the 'Chase' button behind the name of the person you want to chase

When you are chasing someone, the chase HUD will change and you can only end the current chase, before starting another one.



To end a chase you can again do two things:

1) you type: !endchase [lfs username]
2) in the chase HUD you click the 'End chase' button

If you are within 5 meters (code made by Bass-Driver, thanks for letting me use that piece of code) of the person you are chasing, you can type: !book
This will book the offender and cost him some money, or points, or what ever you like.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
I think the same amount as on a regular track.
Project: Cruise for Lapper (CfL)
Yisc[NL]
S3 licensed
For the last couple of weeks I am working on a project that I named: Cruise for Lapper (CfL)
The idea is to create a dynamic cruise system, so that users can set it up any way they want it.

I started by creating a system to define streets and to give them a maximum speed.
That worked very well on regular LFS tracks, but as soon as I started using them on open configs, the system wasn't working anymore.
So I contacted a very good friend of mine who also happens to be a professional developer.
He added an extra function to Lapper (I will release the new version once my project is finished) to enable me to define streets which can be as long as I want to and in any direction I want to.
The GUI to define streets, currently looks like this (of course it's WIP):



It's possible to give the street a name, a maximum speed, a width and you can define the start, end, and as many waypoints (although the GUI currently is limited to 8) as you want.
This could look like this:



After pressing "Store street" the street is saved into the memory of Lapper.
As soon as a player then enters a defined street, it will be shown on the HUD, along with the maximum speed:



If the maximum speed is violated, a message about that is displayed on the HUD and a timer is started.



During that timer a cop can choose to chase the offender in order to try and book him.
If a chase is started, the player who is being chased, will get to see flashing police light at the top of the HUD:




There are still loads of work to be done and I will update this thread, once there is more news.
Let me know what you think of the whole idea and which elements I should certainly include.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
That means that the RDP protocol isn't enabled on the server.
Best thing to do is contact LFS hosting and tell them about your problem.
Yisc[NL]
S3 licensed
And what happens if you try to connect RDP to that IP address?
Yisc[NL]
S3 licensed
I haven't got experience with the LFS hosting option, but it can't be much different then any other server. Connect to your server using RDP, find the directory in which the LFS dedicated server is installed and then find the config file in which the settings of the server are set.
Remove the line starting with /insim and then restart the LFS dedicated server.
Yisc[NL]
S3 licensed
Well, then there isn't much we can do to help you.
I have to admit that I'm surprised to read that you are willing to host an LFS server, but don't have any knowledge how to deal with such server.
No offense, but you shouldn't be hosting a server in the first place then.
Yisc[NL]
S3 licensed
Connect to it using RDP or another remote control tool if that's installed and change the file.
Yisc[NL]
S3 licensed
Remove the whole /insim line from the configuration file and restart the server.
Yisc[NL]
S3 licensed
The insim port (or protocol) has nothing to do with being able to connect to a server or not, unless you connected an application to the Isim port, that crash the whole server (if that's even possible at all).
Simple test would be to start the server without a specified Insim port and then see if connecting is or isn't possible.
If it still isn't possible, something else is wrong.
FGED GREDG RDFGDR GSFDG